.wrapper {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  position: relative;

  &.inline {
    width: 270px;

    &:not(:last-child) {
      margin-bottom: 24px;
    }
  }

  label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-base-400);
    font-weight: 500;
  }

  small {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-base-400);
    font-weight: 500;
  }
}

.teaser {
  background: white;
  border: 1px solid var(--color-base-200);
  border-radius: 4px;
  height: 40px;
  padding: 8px 16px;
  width: 270px;
  font-family: var(--font-primary);
  box-shadow: 0 5px 25px -5px rgba(30, 16, 84, .1);
  color: var(--color-black);
  font-size: 14px;
  -webkit-appearance: none;

  &::placeholder {
    color: var(--color-base-300);
  }

  &:read-only {
    outline: 0;
    pointer-events: none;
  }
}

.input {
  font-family: var(--font-primary);
  font-size: 14px;
  width: 100%;
  height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--color-base-200);
  border-radius: 4px;
  color: var(--color-black);
  background-color: white;
  box-shadow: 0 5px 25px -5px rgba(30, 16, 84, .1);
  -webkit-appearance: none;
  transition: box-shadow 0.2s var(--bezier-snappy);

  &::placeholder {
    color: var(--color-base-300);
  }

  &:focus, &:hover, &.focused {
    box-shadow: var(--box-shadow-hover);
  }

  &.error {
    border-color: var(--color-error);

    ~ small {
      color: var(--color-error);
    }
  }

  &.icon {
    // Make sure that text does not overflow the icon.
    padding-right: 37px;

    ~ svg {
      pointer-events: none;
      position: absolute;
      right: 16px;
      width: 16px;
      height: 16px;
      color: var(--color-base-400);
    }
  }

  &:disabled {
    cursor: not-allowed;
    color: var(--color-base-300);
    background-color: var(--color-base-100);
    box-shadow: none;
  }
}

.required {
  color: var(--color-error);
  font-size: 14px;
  margin-left: 4px;
}

.optional {
  font-size: 12px;
  font-style: italic;
  margin-left: 4px;
}
